/*
 * Copyright (c) 2018-2999 北京小象智慧信息科技有限公司 All rights reserved.
 *
 * https://www.xiaoxiangai.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.dto.SearchProdDto;
import com.yami.shop.bean.model.ShopDetail;

import java.util.List;

/**
 *
 * @author lgh on 2018/08/29.
 */
public interface ShopDetailService extends IService<ShopDetail> {

	void updateShopDetail(ShopDetail shopDetail,ShopDetail dbShopDetail);

	void deleteShopDetailByShopId(Long id);

	/**
	 * 根据店铺id获取店铺信息
	 * @param shopId
	 * @return
	 */
	ShopDetail getShopDetailByShopId(Long shopId);

	void removeShopDetailCacheByShopId(Long shopId);

	List<ShopDetail> selectAll();

	List<ShopDetail> selectByAgentId(Long agentId);

    IPage<ShopDetail> pageAndSortList(Page<ShopDetail> page, double lat, double lng);

	ShopDetail selectByMobile(String mobile);

	ShopDetail selectByIdCard(String idCard);

	ShopDetail selectAuthorityShop(double lat, double lng);

	IPage<ShopDetail> getSearchShopPageByProdName(Page page, String shopName, Integer sort, Integer orderBy,double lat, double lng);

	//获取所有非旗舰店的店铺
	List<ShopDetail> selectAllDetail();

	//获取一个主店下面所有的分店
	List<ShopDetail> getAllBranchStore(Long shopId);

	//根据shopId查询登陆名称
	String getLoginName(Long shopId);

	/**
	 * 根据手机号获取用户的登录名称
	 */
	String getLoginNameByMobile(String mobile);

	/**
	 * 根据用户名查询店铺的shopId
	 */
	Long getShopIdBySysUserName(String userName);


}
